import request from '@/utils/request'

// 查询品牌列表
export function listBrand(query) {
  return request({
    url: '/goods/brand',
    method: 'get',
    params: query
  })
}

// 查询品牌详细
export function getBrand(brandId) {
  return request({
    url: '/goods/brand/' + brandId,
    method: 'get'
  })
}

// 查询所有品牌
export function getBrandAllList() {
  return request({
    url: '/goods/brand/allList',
    method: 'get'
  })
}
// 查询所有品牌
export function getBrandSort() {
  return request({
    url: '/order/goodsBrand/getBrandSort',
    method: 'get'
  })
}

// 新增品牌
export function addBrand(data) {
  return request({
    url: '/goods/brand',
    method: 'post',
    data: data
  })
}

// 修改品牌
export function updateBrand(data) {
  return request({
    url: '/goods/brand',
    method: 'put',
    data: data
  })
}

// 删除定时任务调度
export function delBrand(brandIds) {
  return request({
    url: '/goods/brand/' + brandIds,
    method: 'delete'
  })
}

export default {
  list: listBrand,
  get: getBrand,
  add: addBrand,
  update: updateBrand,
  del: delBrand,
  getBrandAllList: getBrandAllList,
  getBrandSort: getBrandSort
}